@echo off
REM Minimal frontend starter (ASCII only)

REM Check Node/npm
where node >nul 2>&1 || (
  echo Node.js not found. Install Node 18+ and try again.
  goto :eof
)
where npm >nul 2>&1 || (
  echo npm not found. Reinstall Node (with npm) and try again.
  goto :eof
)

REM Go to frontend directory
cd /d "%~dp0frontend" || (
  echo frontend folder not found: %~dp0frontend
  goto :eof
)

REM Install deps if missing
if not exist node_modules (
  echo Installing dependencies...
  call npm.cmd install || goto :eof
)

REM Start Vite using config (host/port set in vite.config.js)
echo Starting Vite dev server...
cmd /k "npm.cmd run dev"
